package com.cq.common.constants;

/**
 * 产品不断
 *
 * @author 程崎
 * @since 2022/10/11
 */
public class ProductConstant {
    public enum AttrEnum {
        /**
         * attr类型
         */
        ATTR_TYPE_BASE(1,"基本属性"), ATTR_TYPE_SALE(0,"销售属性");

        private final int code;

        private final String msg;

        AttrEnum(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public int getCode() {
            return code;
        }

        public String getMsg() {
            return msg;
        }
    }
    public enum StatusEnum {
        /**
         * 商品属性类型
         */
        NEW_SPU(0,"新建"), SPU_UP(1,"商品上架"),SPU_DOWN(2,"商品下架");

        private final int code;

        private final String msg;

        StatusEnum(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public int getCode() {
            return code;
        }

        public String getMsg() {
            return msg;
        }
    }
    public enum CacheEnum {
        /**
         * 商品属性类型
         */
        CACHE_CATALOG_JSON("catalogJson","catalog.json的key值"),
        CACHE_CATALOG_JSON_LOCK("catalog-json-lock","catalog.json锁"),
        LOCK("lock","lock"),
        ;
        private final String key;

        private final String msg;

        CacheEnum(String key, String msg) {
            this.key = key;
            this.msg = msg;
        }

        public String getKey() {
            return key;
        }

        public String getMsg() {
            return msg;
        }
    }
}
